<?php

/*
    BOOTSTRAP
*/
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);

require_once('config.php');

function __autoload($class) {

    $file = SITE_PATH . 'system/' . $class . '.php';

    if(!file_exists($file)) {
        $file = CONTROLLER_PATH . '/' . $class . '.php';
    }

    require_once($file);

}

try {

    TW_Router::run(new TW_Request());

} catch (Exception $e) {
	
    new error($e->getMessage());
    
}